<template>
  <div class="stepitem base_set">
    <!-- 标注环节设置 -->
    <MarkEnvironmentSet ref="markEnvironmentSet" :comInfo="batchInfo" :batchEdit="batchEdit"/>
    <!-- 积分设置 -->
    <!-- <IntegralSet ref="integralSet" :comInfo="batchInfo.integralSet"/> -->
    <!-- 数据导入 -->
    <CloudDiskImport ref="cloudDiskImport" :comInfo="batchInfo" :batchEdit="batchEdit"/>
    <!-- 术语导入 -->
    <!-- <TermImport ref="termImport" :comInfo="batchInfo.termImport"/> -->
    <!-- 语言类型 -->
    <!-- <LanguageType ref="languageType" :comInfo="batchInfo.languageType"/> -->
    <!-- 是否原始数据翻译 -->
    <!-- <MachineTranslation ref="machineTranslation" :comInfo="batchInfo.machineTranslation"/> -->
    <component v-for="(item, index) in businessBatchConfig" :key="index" :is="item.ename | _toUpperCase" 
      :ref="item.ename" :comInfo="batchInfo" :batchEdit="batchEdit"></component>
  </div>
</template>
<script>
import IntegralSet from '@/components/create-batch/IntegralSet'
import MarkEnvironmentSet from '@/components/create-batch/MarkEnvironmentSet'
import CloudDiskImport from '@/components/create-batch/CloudDiskImport'
import TermImport from '@/components/create-batch/TermImport'
import MachineTranslation from '@/components/create-batch/MachineTranslation'
import LanguageType from '@/components/create-batch/LanguageType'
export default {
  name: "BaseSetting",
  data() {
    return {


    };
  },
  props: ["batchInfo","businessBatchConfig","batchEdit"],
  created() {
    if (this.batchInfo) {
      // 继承老批次数据
      Object.keys(this.batchInfo).forEach(key => {
        if (this.$data.hasOwnProperty(key)) {
          this.$set(this, key, this.batchInfo[key])
        }
      })
    }
  },
  watch: {
  },
  methods: {


  },
  mounted: function () {

  },
  filters: {
    _toUpperCase(str){
      return str.slice(0, 1).toUpperCase() + str.slice(1)
    }
  },
  components: {
    IntegralSet, // 积分设置
    MarkEnvironmentSet, // 检查设置
    CloudDiskImport, // 云盘导入
    TermImport, // 术语导入
    MachineTranslation, // 是否翻译
    LanguageType, // 语言类型
  }
};
</script>
<style lang="less">
// @import "~@/assets/css/common/create_bat.css";
.title {
  color: #5e6a68;
  font-size: 16px;
  font-weight: 700;
  line-height: 48px;
  display: block;
  position: relative;
  padding-left: 14px;
  margin-top: 10px;
  &::before {
    position: absolute;
    left: 0;
    top: 17px;
    width: 4px;
    height: 15px;
    display: block;
    background: #07d569;
    content: "";
  }
  p {
    padding: 5px 23px;
    display: inline;
    font-size: 12px;
    font-weight: normal;
    color: #e07900;
  }
}
</style>
